3.16.32 \(\int \frac {(b+2 c x) (d+e x)^4}{(a+b x+c x^2)^2} \, dx\) [1532]

Optimal. Leaf size=172 \[ \frac {4 e^3 (3 c d-b e) x}{c^2}+\frac {2 e^4 x^2}{c}-\frac {(d+e x)^4}{a+b x+c x^2}-\frac {4 e (2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \sqrt {b^2-4 a c}}+\frac {2 e^2 \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) \log \left (a+b x+c x^2\right )}{c^3} \]

[Out]

4*e^3*(-b*e+3*c*d)*x/c^2+2*e^4*x^2/c-(e*x+d)^4/(c*x^2+b*x+a)+2*e^2*(3*c^2*d^2+b^2*e^2-c*e*(a*e+3*b*d))*ln(c*x^
2+b*x+a)/c^3-4*e*(-b*e+2*c*d)*(c^2*d^2+b^2*e^2-c*e*(3*a*e+b*d))*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1/2))/c^3/(-4*
a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {782, 715, 648, 632, 212, 642} \begin {gather*} \frac {2 e^2 \left (-c e (a e+3 b d)+b^2 e^2+3 c^2 d^2\right ) \log \left (a+b x+c x^2\right )}{c^3}-\frac {4 e (2 c d-b e) \left (-c e (3 a e+b d)+b^2 e^2+c^2 d^2\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \sqrt {b^2-4 a c}}-\frac {(d+e x)^4}{a+b x+c x^2}+\frac {4 e^3 x (3 c d-b e)}{c^2}+\frac {2 e^4 x^2}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((b + 2*c*x)*(d + e*x)^4)/(a + b*x + c*x^2)^2,x]

[Out]

(4*e^3*(3*c*d - b*e)*x)/c^2 + (2*e^4*x^2)/c - (d + e*x)^4/(a + b*x + c*x^2) - (4*e*(2*c*d - b*e)*(c^2*d^2 + b^
2*e^2 - c*e*(b*d + 3*a*e))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(c^3*Sqrt[b^2 - 4*a*c]) + (2*e^2*(3*c^2*d^2
 + b^2*e^2 - c*e*(3*b*d + a*e))*Log[a + b*x + c*x^2])/c^3

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 715

Int[((d_.) + (e_.)*(x_))^(m_)/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)
^m, a + b*x + c*x^2, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2,
0] && NeQ[2*c*d - b*e, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 782

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Sim
p[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 1)/(2*c*(p + 1))), x] - Dist[e*g*(m/(2*c*(p + 1))), Int[(d + e*x)^(m -
 1)*(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && EqQ[2*c*f - b*g, 0] && LtQ[p, -1]
&& GtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {(b+2 c x) (d+e x)^4}{\left (a+b x+c x^2\right )^2} \, dx &=-\frac {(d+e x)^4}{a+b x+c x^2}+(4 e) \int \frac {(d+e x)^3}{a+b x+c x^2} \, dx\\ &=-\frac {(d+e x)^4}{a+b x+c x^2}+(4 e) \int \left (\frac {e^2 (3 c d-b e)}{c^2}+\frac {e^3 x}{c}+\frac {c^2 d^3-3 a c d e^2+a b e^3+e \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac {4 e^3 (3 c d-b e) x}{c^2}+\frac {2 e^4 x^2}{c}-\frac {(d+e x)^4}{a+b x+c x^2}+\frac {(4 e) \int \frac {c^2 d^3-3 a c d e^2+a b e^3+e \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) x}{a+b x+c x^2} \, dx}{c^2}\\ &=\frac {4 e^3 (3 c d-b e) x}{c^2}+\frac {2 e^4 x^2}{c}-\frac {(d+e x)^4}{a+b x+c x^2}+\frac {\left (2 e^2 \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right )\right ) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{c^3}+\frac {\left (2 e (2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right )\right ) \int \frac {1}{a+b x+c x^2} \, dx}{c^3}\\ &=\frac {4 e^3 (3 c d-b e) x}{c^2}+\frac {2 e^4 x^2}{c}-\frac {(d+e x)^4}{a+b x+c x^2}+\frac {2 e^2 \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) \log \left (a+b x+c x^2\right )}{c^3}-\frac {\left (4 e (2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^3}\\ &=\frac {4 e^3 (3 c d-b e) x}{c^2}+\frac {2 e^4 x^2}{c}-\frac {(d+e x)^4}{a+b x+c x^2}-\frac {4 e (2 c d-b e) \left (c^2 d^2+b^2 e^2-c e (b d+3 a e)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \sqrt {b^2-4 a c}}+\frac {2 e^2 \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) \log \left (a+b x+c x^2\right )}{c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.20, size = 241, normalized size = 1.40 \begin {gather*} \frac {c e^3 (8 c d-3 b e) x+c^2 e^4 x^2+\frac {b^2 e^4 (a+b x)-c^3 d^3 (d+4 e x)+2 c^2 d e^2 (3 a d+3 b d x+2 a e x)-c e^3 \left (a^2 e+4 b^2 d x+2 a b (2 d+e x)\right )}{a+x (b+c x)}+\frac {4 e (-2 c d+b e) \left (-c^2 d^2-b^2 e^2+c e (b d+3 a e)\right ) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+2 e^2 \left (3 c^2 d^2+b^2 e^2-c e (3 b d+a e)\right ) \log (a+x (b+c x))}{c^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((b + 2*c*x)*(d + e*x)^4)/(a + b*x + c*x^2)^2,x]

[Out]

(c*e^3*(8*c*d - 3*b*e)*x + c^2*e^4*x^2 + (b^2*e^4*(a + b*x) - c^3*d^3*(d + 4*e*x) + 2*c^2*d*e^2*(3*a*d + 3*b*d
*x + 2*a*e*x) - c*e^3*(a^2*e + 4*b^2*d*x + 2*a*b*(2*d + e*x)))/(a + x*(b + c*x)) + (4*e*(-2*c*d + b*e)*(-(c^2*
d^2) - b^2*e^2 + c*e*(b*d + 3*a*e))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + 2*e^2*(3*c^2*
d^2 + b^2*e^2 - c*e*(3*b*d + a*e))*Log[a + x*(b + c*x)])/c^3

________________________________________________________________________________________

Maple [A]
time = 0.95, size = 306, normalized size = 1.78

method result size
default \(-\frac {e^{3} \left (-c e \,x^{2}+3 b e x -8 c d x \right )}{c^{2}}+\frac {\frac {-\frac {\left (2 c \,e^{3} a b -4 d \,e^{2} c^{2} a -b^{3} e^{3}+4 b^{2} d \,e^{2} c -6 b \,c^{2} d^{2} e +4 c^{3} d^{3}\right ) e x}{c}-\frac {e^{4} a^{2} c -a \,b^{2} e^{4}+4 a b c d \,e^{3}-6 d^{2} e^{2} c^{2} a +d^{4} c^{3}}{c}}{c \,x^{2}+b x +a}+4 e \left (\frac {\left (-a c \,e^{3}+b^{2} e^{3}-3 d \,e^{2} b c +3 d^{2} e \,c^{2}\right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (a b \,e^{3}-3 a d \,e^{2} c +c^{2} d^{3}-\frac {\left (-a c \,e^{3}+b^{2} e^{3}-3 d \,e^{2} b c +3 d^{2} e \,c^{2}\right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}\right )}{c^{2}}\) \(306\)
risch \(\text {Expression too large to display}\) \(4244\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*c*x+b)*(e*x+d)^4/(c*x^2+b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

-e^3/c^2*(-c*e*x^2+3*b*e*x-8*c*d*x)+1/c^2*((-(2*a*b*c*e^3-4*a*c^2*d*e^2-b^3*e^3+4*b^2*c*d*e^2-6*b*c^2*d^2*e+4*
c^3*d^3)*e/c*x-(a^2*c*e^4-a*b^2*e^4+4*a*b*c*d*e^3-6*a*c^2*d^2*e^2+c^3*d^4)/c)/(c*x^2+b*x+a)+4*e*(1/2*(-a*c*e^3
+b^2*e^3-3*b*c*d*e^2+3*c^2*d^2*e)/c*ln(c*x^2+b*x+a)+2*(a*b*e^3-3*a*d*e^2*c+c^2*d^3-1/2*(-a*c*e^3+b^2*e^3-3*b*c
*d*e^2+3*c^2*d^2*e)*b/c)/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)^4/(c*x^2+b*x+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more deta

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 785 vs. \(2 (171) = 342\).
time = 2.26, size = 1591, normalized size = 9.25 \begin {gather*} \left [-\frac {4 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d^{3} x e + {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d^{4} + 2 \, \sqrt {b^{2} - 4 \, a c} {\left ({\left (a b^{3} - 3 \, a^{2} b c + {\left (b^{3} c - 3 \, a b c^{2}\right )} x^{2} + {\left (b^{4} - 3 \, a b^{2} c\right )} x\right )} e^{4} - 3 \, {\left ({\left (b^{2} c^{2} - 2 \, a c^{3}\right )} d x^{2} + {\left (b^{3} c - 2 \, a b c^{2}\right )} d x + {\left (a b^{2} c - 2 \, a^{2} c^{2}\right )} d\right )} e^{3} + 3 \, {\left (b c^{3} d^{2} x^{2} + b^{2} c^{2} d^{2} x + a b c^{2} d^{2}\right )} e^{2} - 2 \, {\left (c^{4} d^{3} x^{2} + b c^{3} d^{3} x + a c^{3} d^{3}\right )} e\right )} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) - {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2} + {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} x^{4} - 2 \, {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} x^{3} - {\left (3 \, b^{4} c - 13 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 9 \, a b^{3} c + 20 \, a^{2} b c^{2}\right )} x\right )} e^{4} - 4 \, {\left (2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d x^{3} + 2 \, {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d x^{2} - {\left (b^{4} c - 7 \, a b^{2} c^{2} + 12 \, a^{2} c^{3}\right )} d x - {\left (a b^{3} c - 4 \, a^{2} b c^{2}\right )} d\right )} e^{3} - 6 \, {\left ({\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d^{2} x + {\left (a b^{2} c^{2} - 4 \, a^{2} c^{3}\right )} d^{2}\right )} e^{2} - 2 \, {\left ({\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2} + {\left (b^{4} c - 5 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 5 \, a b^{3} c + 4 \, a^{2} b c^{2}\right )} x\right )} e^{4} - 3 \, {\left ({\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d x^{2} + {\left (b^{4} c - 4 \, a b^{2} c^{2}\right )} d x + {\left (a b^{3} c - 4 \, a^{2} b c^{2}\right )} d\right )} e^{3} + 3 \, {\left ({\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d^{2} x^{2} + {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d^{2} x + {\left (a b^{2} c^{2} - 4 \, a^{2} c^{3}\right )} d^{2}\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{a b^{2} c^{3} - 4 \, a^{2} c^{4} + {\left (b^{2} c^{4} - 4 \, a c^{5}\right )} x^{2} + {\left (b^{3} c^{3} - 4 \, a b c^{4}\right )} x}, -\frac {4 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d^{3} x e + {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d^{4} - 4 \, \sqrt {-b^{2} + 4 \, a c} {\left ({\left (a b^{3} - 3 \, a^{2} b c + {\left (b^{3} c - 3 \, a b c^{2}\right )} x^{2} + {\left (b^{4} - 3 \, a b^{2} c\right )} x\right )} e^{4} - 3 \, {\left ({\left (b^{2} c^{2} - 2 \, a c^{3}\right )} d x^{2} + {\left (b^{3} c - 2 \, a b c^{2}\right )} d x + {\left (a b^{2} c - 2 \, a^{2} c^{2}\right )} d\right )} e^{3} + 3 \, {\left (b c^{3} d^{2} x^{2} + b^{2} c^{2} d^{2} x + a b c^{2} d^{2}\right )} e^{2} - 2 \, {\left (c^{4} d^{3} x^{2} + b c^{3} d^{3} x + a c^{3} d^{3}\right )} e\right )} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - {\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2} + {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} x^{4} - 2 \, {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} x^{3} - {\left (3 \, b^{4} c - 13 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 9 \, a b^{3} c + 20 \, a^{2} b c^{2}\right )} x\right )} e^{4} - 4 \, {\left (2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d x^{3} + 2 \, {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d x^{2} - {\left (b^{4} c - 7 \, a b^{2} c^{2} + 12 \, a^{2} c^{3}\right )} d x - {\left (a b^{3} c - 4 \, a^{2} b c^{2}\right )} d\right )} e^{3} - 6 \, {\left ({\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d^{2} x + {\left (a b^{2} c^{2} - 4 \, a^{2} c^{3}\right )} d^{2}\right )} e^{2} - 2 \, {\left ({\left (a b^{4} - 5 \, a^{2} b^{2} c + 4 \, a^{3} c^{2} + {\left (b^{4} c - 5 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 5 \, a b^{3} c + 4 \, a^{2} b c^{2}\right )} x\right )} e^{4} - 3 \, {\left ({\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d x^{2} + {\left (b^{4} c - 4 \, a b^{2} c^{2}\right )} d x + {\left (a b^{3} c - 4 \, a^{2} b c^{2}\right )} d\right )} e^{3} + 3 \, {\left ({\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d^{2} x^{2} + {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d^{2} x + {\left (a b^{2} c^{2} - 4 \, a^{2} c^{3}\right )} d^{2}\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{a b^{2} c^{3} - 4 \, a^{2} c^{4} + {\left (b^{2} c^{4} - 4 \, a c^{5}\right )} x^{2} + {\left (b^{3} c^{3} - 4 \, a b c^{4}\right )} x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this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^5 - 5*a*b^3*c + 4*a^2*b*c^2)*x)*e^4 - 3*((b^3*c^2 - 4*a*b*c^3)*d*x^2 + (b^4*c - 4*a*b^2*c^2)*d*x + (a*b^3*c -
 4*a^2*b*c^2)*d)*e^3 + 3*((b^2*c^3 - 4*a*c^4)*d^2*x^2 + (b^3*c^2 - 4*a*b*c^3)*d^2*x + (a*b^2*c^2 - 4*a^2*c^3)*
d^2)*e^2)*log(c*x^2 + b*x + a))/(a*b^2*c^3 - 4*a^2*c^4 + (b^2*c^4 - 4*a*c^5)*x^2 + (b^3*c^3 - 4*a*b*c^4)*x)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1071 vs. \(2 (165) = 330\).
time = 19.80, size = 1071, normalized size = 6.23 \begin {gather*} x \left (- \frac {3 b e^{4}}{c^{2}} + \frac {8 d e^{3}}{c}\right ) + \left (- \frac {2 e^{2} \left (a c e^{2} - b^{2} e^{2} + 3 b c d e - 3 c^{2} d^{2}\right )}{c^{3}} - \frac {2 e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (3 a c e^{2} - b^{2} e^{2} + b c d e - c^{2} d^{2}\right )}{c^{3} \cdot \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {8 a^{2} c e^{4} - 4 a b^{2} e^{4} + 12 a b c d e^{3} + 4 a c^{3} \left (- \frac {2 e^{2} \left (a c e^{2} - b^{2} e^{2} + 3 b c d e - 3 c^{2} d^{2}\right )}{c^{3}} - \frac {2 e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (3 a c e^{2} - b^{2} e^{2} + b c d e - c^{2} d^{2}\right )}{c^{3} \cdot \left (4 a c - b^{2}\right )}\right ) - 24 a c^{2} d^{2} e^{2} - b^{2} c^{2} \left (- \frac {2 e^{2} \left (a c e^{2} - b^{2} e^{2} + 3 b c d e - 3 c^{2} d^{2}\right )}{c^{3}} - \frac {2 e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (3 a c e^{2} - b^{2} e^{2} + b c d e - c^{2} d^{2}\right )}{c^{3} \cdot \left (4 a c - b^{2}\right )}\right ) + 4 b c^{2} d^{3} e}{12 a b c e^{4} - 24 a c^{2} d e^{3} - 4 b^{3} e^{4} + 12 b^{2} c d e^{3} - 12 b c^{2} d^{2} e^{2} + 8 c^{3} d^{3} e} \right )} + \left (- \frac {2 e^{2} \left (a c e^{2} - b^{2} e^{2} + 3 b c d e - 3 c^{2} d^{2}\right )}{c^{3}} + \frac {2 e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (3 a c e^{2} - b^{2} e^{2} + b c d e - c^{2} d^{2}\right )}{c^{3} \cdot \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {8 a^{2} c e^{4} - 4 a b^{2} e^{4} + 12 a b c d e^{3} + 4 a c^{3} \left (- \frac {2 e^{2} \left (a c e^{2} - b^{2} e^{2} + 3 b c d e - 3 c^{2} d^{2}\right )}{c^{3}} + \frac {2 e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (3 a c e^{2} - b^{2} e^{2} + b c d e - c^{2} d^{2}\right )}{c^{3} \cdot \left (4 a c - b^{2}\right )}\right ) - 24 a c^{2} d^{2} e^{2} - b^{2} c^{2} \left (- \frac {2 e^{2} \left (a c e^{2} - b^{2} e^{2} + 3 b c d e - 3 c^{2} d^{2}\right )}{c^{3}} + \frac {2 e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right ) \left (3 a c e^{2} - b^{2} e^{2} + b c d e - c^{2} d^{2}\right )}{c^{3} \cdot \left (4 a c - b^{2}\right )}\right ) + 4 b c^{2} d^{3} e}{12 a b c e^{4} - 24 a c^{2} d e^{3} - 4 b^{3} e^{4} + 12 b^{2} c d e^{3} - 12 b c^{2} d^{2} e^{2} + 8 c^{3} d^{3} e} \right )} + \frac {- a^{2} c e^{4} + a b^{2} e^{4} - 4 a b c d e^{3} + 6 a c^{2} d^{2} e^{2} - c^{3} d^{4} + x \left (- 2 a b c e^{4} + 4 a c^{2} d e^{3} + b^{3} e^{4} - 4 b^{2} c d e^{3} + 6 b c^{2} d^{2} e^{2} - 4 c^{3} d^{3} e\right )}{a c^{3} + b c^{3} x + c^{4} x^{2}} + \frac {e^{4} x^{2}}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)**4/(c*x**2+b*x+a)**2,x)

[Out]

x*(-3*b*e**4/c**2 + 8*d*e**3/c) + (-2*e**2*(a*c*e**2 - b**2*e**2 + 3*b*c*d*e - 3*c**2*d**2)/c**3 - 2*e*sqrt(-4
*a*c + b**2)*(b*e - 2*c*d)*(3*a*c*e**2 - b**2*e**2 + b*c*d*e - c**2*d**2)/(c**3*(4*a*c - b**2)))*log(x + (8*a*
*2*c*e**4 - 4*a*b**2*e**4 + 12*a*b*c*d*e**3 + 4*a*c**3*(-2*e**2*(a*c*e**2 - b**2*e**2 + 3*b*c*d*e - 3*c**2*d**
2)/c**3 - 2*e*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)*(3*a*c*e**2 - b**2*e**2 + b*c*d*e - c**2*d**2)/(c**3*(4*a*c -
b**2))) - 24*a*c**2*d**2*e**2 - b**2*c**2*(-2*e**2*(a*c*e**2 - b**2*e**2 + 3*b*c*d*e - 3*c**2*d**2)/c**3 - 2*e
*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)*(3*a*c*e**2 - b**2*e**2 + b*c*d*e - c**2*d**2)/(c**3*(4*a*c - b**2))) + 4*b
*c**2*d**3*e)/(12*a*b*c*e**4 - 24*a*c**2*d*e**3 - 4*b**3*e**4 + 12*b**2*c*d*e**3 - 12*b*c**2*d**2*e**2 + 8*c**
3*d**3*e)) + (-2*e**2*(a*c*e**2 - b**2*e**2 + 3*b*c*d*e - 3*c**2*d**2)/c**3 + 2*e*sqrt(-4*a*c + b**2)*(b*e - 2
*c*d)*(3*a*c*e**2 - b**2*e**2 + b*c*d*e - c**2*d**2)/(c**3*(4*a*c - b**2)))*log(x + (8*a**2*c*e**4 - 4*a*b**2*
e**4 + 12*a*b*c*d*e**3 + 4*a*c**3*(-2*e**2*(a*c*e**2 - b**2*e**2 + 3*b*c*d*e - 3*c**2*d**2)/c**3 + 2*e*sqrt(-4
*a*c + b**2)*(b*e - 2*c*d)*(3*a*c*e**2 - b**2*e**2 + b*c*d*e - c**2*d**2)/(c**3*(4*a*c - b**2))) - 24*a*c**2*d
**2*e**2 - b**2*c**2*(-2*e**2*(a*c*e**2 - b**2*e**2 + 3*b*c*d*e - 3*c**2*d**2)/c**3 + 2*e*sqrt(-4*a*c + b**2)*
(b*e - 2*c*d)*(3*a*c*e**2 - b**2*e**2 + b*c*d*e - c**2*d**2)/(c**3*(4*a*c - b**2))) + 4*b*c**2*d**3*e)/(12*a*b
*c*e**4 - 24*a*c**2*d*e**3 - 4*b**3*e**4 + 12*b**2*c*d*e**3 - 12*b*c**2*d**2*e**2 + 8*c**3*d**3*e)) + (-a**2*c
*e**4 + a*b**2*e**4 - 4*a*b*c*d*e**3 + 6*a*c**2*d**2*e**2 - c**3*d**4 + x*(-2*a*b*c*e**4 + 4*a*c**2*d*e**3 + b
**3*e**4 - 4*b**2*c*d*e**3 + 6*b*c**2*d**2*e**2 - 4*c**3*d**3*e))/(a*c**3 + b*c**3*x + c**4*x**2) + e**4*x**2/
c

________________________________________________________________________________________

Giac [A]
time = 1.27, size = 285, normalized size = 1.66 \begin {gather*} \frac {2 \, {\left (3 \, c^{2} d^{2} e^{2} - 3 \, b c d e^{3} + b^{2} e^{4} - a c e^{4}\right )} \log \left (c x^{2} + b x + a\right )}{c^{3}} + \frac {4 \, {\left (2 \, c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \, b^{2} c d e^{3} - 6 \, a c^{2} d e^{3} - b^{3} e^{4} + 3 \, a b c e^{4}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c^{3}} + \frac {c^{3} x^{2} e^{4} + 8 \, c^{3} d x e^{3} - 3 \, b c^{2} x e^{4}}{c^{4}} - \frac {c^{3} d^{4} - 6 \, a c^{2} d^{2} e^{2} + 4 \, a b c d e^{3} - a b^{2} e^{4} + a^{2} c e^{4} + {\left (4 \, c^{3} d^{3} e - 6 \, b c^{2} d^{2} e^{2} + 4 \, b^{2} c d e^{3} - 4 \, a c^{2} d e^{3} - b^{3} e^{4} + 2 \, a b c e^{4}\right )} x}{{\left (c x^{2} + b x + a\right )} c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)^4/(c*x^2+b*x+a)^2,x, algorithm="giac")

[Out]

2*(3*c^2*d^2*e^2 - 3*b*c*d*e^3 + b^2*e^4 - a*c*e^4)*log(c*x^2 + b*x + a)/c^3 + 4*(2*c^3*d^3*e - 3*b*c^2*d^2*e^
2 + 3*b^2*c*d*e^3 - 6*a*c^2*d*e^3 - b^3*e^4 + 3*a*b*c*e^4)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 +
 4*a*c)*c^3) + (c^3*x^2*e^4 + 8*c^3*d*x*e^3 - 3*b*c^2*x*e^4)/c^4 - (c^3*d^4 - 6*a*c^2*d^2*e^2 + 4*a*b*c*d*e^3
- a*b^2*e^4 + a^2*c*e^4 + (4*c^3*d^3*e - 6*b*c^2*d^2*e^2 + 4*b^2*c*d*e^3 - 4*a*c^2*d*e^3 - b^3*e^4 + 2*a*b*c*e
^4)*x)/((c*x^2 + b*x + a)*c^3)

________________________________________________________________________________________

Mupad [B]
time = 0.32, size = 358, normalized size = 2.08 \begin {gather*} x\,\left (\frac {b\,e^4+8\,c\,d\,e^3}{c^2}-\frac {4\,b\,e^4}{c^2}\right )-\frac {\frac {a^2\,c\,e^4-a\,b^2\,e^4+4\,a\,b\,c\,d\,e^3-6\,a\,c^2\,d^2\,e^2+c^3\,d^4}{c}-\frac {x\,\left (b^3\,e^4-4\,b^2\,c\,d\,e^3+6\,b\,c^2\,d^2\,e^2-2\,a\,b\,c\,e^4-4\,c^3\,d^3\,e+4\,a\,c^2\,d\,e^3\right )}{c}}{c^3\,x^2+b\,c^2\,x+a\,c^2}-\frac {\ln \left (c\,x^2+b\,x+a\right )\,\left (16\,a^2\,c^2\,e^4-20\,a\,b^2\,c\,e^4+48\,a\,b\,c^2\,d\,e^3-48\,a\,c^3\,d^2\,e^2+4\,b^4\,e^4-12\,b^3\,c\,d\,e^3+12\,b^2\,c^2\,d^2\,e^2\right )}{2\,\left (4\,a\,c^4-b^2\,c^3\right )}+\frac {e^4\,x^2}{c}-\frac {4\,e\,\mathrm {atan}\left (\frac {b+2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )\,\left (b\,e-2\,c\,d\right )\,\left (b^2\,e^2-b\,c\,d\,e+c^2\,d^2-3\,a\,c\,e^2\right )}{c^3\,\sqrt {4\,a\,c-b^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((b + 2*c*x)*(d + e*x)^4)/(a + b*x + c*x^2)^2,x)

[Out]

x*((b*e^4 + 8*c*d*e^3)/c^2 - (4*b*e^4)/c^2) - ((c^3*d^4 - a*b^2*e^4 + a^2*c*e^4 - 6*a*c^2*d^2*e^2 + 4*a*b*c*d*
e^3)/c - (x*(b^3*e^4 - 4*c^3*d^3*e + 6*b*c^2*d^2*e^2 - 2*a*b*c*e^4 + 4*a*c^2*d*e^3 - 4*b^2*c*d*e^3))/c)/(a*c^2
 + c^3*x^2 + b*c^2*x) - (log(a + b*x + c*x^2)*(4*b^4*e^4 + 16*a^2*c^2*e^4 - 48*a*c^3*d^2*e^2 + 12*b^2*c^2*d^2*
e^2 - 20*a*b^2*c*e^4 - 12*b^3*c*d*e^3 + 48*a*b*c^2*d*e^3))/(2*(4*a*c^4 - b^2*c^3)) + (e^4*x^2)/c - (4*e*atan((
b + 2*c*x)/(4*a*c - b^2)^(1/2))*(b*e - 2*c*d)*(b^2*e^2 + c^2*d^2 - 3*a*c*e^2 - b*c*d*e))/(c^3*(4*a*c - b^2)^(1
/2))

________________________________________________________________________________________